//
//  CmtRECTopics.m
//  Products_B
//
//  Created by lanou on 16/5/28.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "CmtRECTopics.h"

@implementation CmtRECTopics
- (instancetype)init
{
    self = [super init];
    if (self) {
        _dataArr = [[NSMutableArray alloc]init];
        
    }
    return self;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key{

    if ([key isEqualToString:@"id"]) {
        __id = value;
    }
    
    if ([key isEqualToString:@"data"]) {
        NSArray *valueArr = (NSArray *)value;
        for (NSDictionary *dic in valueArr) {
            _model = [[CmtTopicsDataModel alloc]init];
            [self.model setValuesForKeysWithDictionary:dic];
            [self.dataArr addObject:_model];
        }
        
    }else{

        [super setValue:value forUndefinedKey:key];
    }
}

@end
